/**
 *
 * Access (ABM), 2017-2020, 单创.
 */
package com.tengju.user.domain.model.sign;

import lombok.Getter;

import java.util.Arrays;

@Getter
public enum StarAccountTypeEnum {

    BUSINESS(1, "企业"),
    SELF(2, "个体工商户"),
    LESHUI(3, "乐税");



    private int type;
    private String desc;

    private StarAccountTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }


    public static StarAccountTypeEnum getByType(int type) {
        return Arrays.stream(StarAccountTypeEnum.values()).filter(k->k.getType() == type)
        .findFirst().orElse(null);
    }

}
